package com.itheima.stock.controller.v1;

import com.itheima.stock.api.StockControllerAPI;
import com.itheima.stock.entity.StockBusiness;
import com.itheima.stock.service.StockService;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
public class StockController implements StockControllerAPI {

    private final StockService stockService;

    public StockController(StockService stockService) {
        this.stockService = stockService;
    }

    @Override
    public List<StockBusiness> getStockBusiness() {
        return stockService.getStockBusiness();
    }
}
